package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TechnicianUpgradeItemOrderMapper;
import com.ruoyi.order.domain.TechnicianUpgradeItemOrder;
import com.ruoyi.order.service.ITechnicianUpgradeItemOrderService;

/**
 * 升级订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class TechnicianUpgradeItemOrderServiceImpl implements ITechnicianUpgradeItemOrderService 
{
    @Autowired
    private TechnicianUpgradeItemOrderMapper technicianUpgradeItemOrderMapper;

    /**
     * 查询升级订单
     * 
     * @param id 升级订单主键
     * @return 升级订单
     */
    @Override
    public TechnicianUpgradeItemOrder selectTechnicianUpgradeItemOrderById(Long id)
    {
        return technicianUpgradeItemOrderMapper.selectTechnicianUpgradeItemOrderById(id);
    }

    /**
     * 查询升级订单列表
     * 
     * @param technicianUpgradeItemOrder 升级订单
     * @return 升级订单
     */
    @Override
    public List<TechnicianUpgradeItemOrder> selectTechnicianUpgradeItemOrderList(TechnicianUpgradeItemOrder technicianUpgradeItemOrder)
    {
        return technicianUpgradeItemOrderMapper.selectTechnicianUpgradeItemOrderList(technicianUpgradeItemOrder);
    }

    /**
     * 新增升级订单
     * 
     * @param technicianUpgradeItemOrder 升级订单
     * @return 结果
     */
    @Override
    public int insertTechnicianUpgradeItemOrder(TechnicianUpgradeItemOrder technicianUpgradeItemOrder)
    {
        technicianUpgradeItemOrder.setCreateTime(DateUtils.getNowDate());
        return technicianUpgradeItemOrderMapper.insertTechnicianUpgradeItemOrder(technicianUpgradeItemOrder);
    }

    /**
     * 修改升级订单
     * 
     * @param technicianUpgradeItemOrder 升级订单
     * @return 结果
     */
    @Override
    public int updateTechnicianUpgradeItemOrder(TechnicianUpgradeItemOrder technicianUpgradeItemOrder)
    {
        technicianUpgradeItemOrder.setUpdateTime(DateUtils.getNowDate());
        return technicianUpgradeItemOrderMapper.updateTechnicianUpgradeItemOrder(technicianUpgradeItemOrder);
    }

    /**
     * 批量删除升级订单
     * 
     * @param ids 需要删除的升级订单主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianUpgradeItemOrderByIds(Long[] ids)
    {
        return technicianUpgradeItemOrderMapper.deleteTechnicianUpgradeItemOrderByIds(ids);
    }

    /**
     * 删除升级订单信息
     * 
     * @param id 升级订单主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianUpgradeItemOrderById(Long id)
    {
        return technicianUpgradeItemOrderMapper.deleteTechnicianUpgradeItemOrderById(id);
    }
}
